# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BigQueryConnection.V1beta1.Model.Connection do
  @moduledoc """
  Configuration parameters to establish connection with an external data source, except the credential attributes.

  ## Attributes

  *   `cloudSql` (*type:* `GoogleApi.BigQueryConnection.V1beta1.Model.CloudSqlProperties.t`, *default:* `nil`) - Cloud SQL properties.
  *   `creationTime` (*type:* `String.t`, *default:* `nil`) - Output only. The creation timestamp of the connection.
  *   `description` (*type:* `String.t`, *default:* `nil`) - User provided description.
  *   `friendlyName` (*type:* `String.t`, *default:* `nil`) - User provided display name for the connection.
  *   `hasCredential` (*type:* `boolean()`, *default:* `nil`) - Output only. True, if credential is configured for this connection.
  *   `lastModifiedTime` (*type:* `String.t`, *default:* `nil`) - Output only. The last update timestamp of the connection.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the connection in the form of: `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cloudSql => GoogleApi.BigQueryConnection.V1beta1.Model.CloudSqlProperties.t() | nil,
          :creationTime => String.t() | nil,
          :description => String.t() | nil,
          :friendlyName => String.t() | nil,
          :hasCredential => boolean() | nil,
          :lastModifiedTime => String.t() | nil,
          :name => String.t() | nil
        }

  field(:cloudSql, as: GoogleApi.BigQueryConnection.V1beta1.Model.CloudSqlProperties)
  field(:creationTime)
  field(:description)
  field(:friendlyName)
  field(:hasCredential)
  field(:lastModifiedTime)
  field(:name)
end

defimpl Poison.Decoder, for: GoogleApi.BigQueryConnection.V1beta1.Model.Connection do
  def decode(value, options) do
    GoogleApi.BigQueryConnection.V1beta1.Model.Connection.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigQueryConnection.V1beta1.Model.Connection do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
